class AI1000 {
    constructor() {
        this.length = 80;
    }
    run(node) {
        let role = game.getRole();
        let dx = role.x - node.x;
        let dy = role.y - node.y;
        if (dx * dx + dy * dy < this.length ** 2) {
            return;
        }
        if (dy == 0) {
            dy = 1;
        }
        let angel = Math.atan(dx / dy) * 180 / Math.PI;
        if (dy < 0) {
            angel += 180;
        }
        angel += 10;
        node.x += node.speed * Math.sin(angel * Math.PI / 180);
        node.y += node.speed * Math.cos(angel * Math.PI / 180);
    }
};
module.exports = {
    createAI() {
        return new AI1000();
    }
}